<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<title>无缝滚动</title>
		<style type="text/css">
			body,
			ul {
				margin: 0;
				padding: 0;
			}
			
			.list_con {
				width: 1000px;
				height: 200px;
				border: 1px solid #000;
				margin: 50px auto 0;
				background-color: #f0f0f0;
				position: relative;
				overflow: hidden;
			}
			
			.list_con ul {
				list-style: none;
				width: 2000px;
				height: 200px;
				position: absolute;
				left: 0;
				top: 0;
			}
			
			.list_con li {
				width: 180px;
				height: 180px;
				float: left;
				margin: 10px;
			}
			
			.btns_con {
				width: 1000px;
				height: 30px;
				margin: 50px auto 0;
				position: relative;
			}
			
			.left,
			.right {
				width: 30px;
				height: 30px;
				background-color: gold;
				position: absolute;
				left: -40px;
				top: 124px;
				font-size: 30px;
				line-height: 30px;
				color: #000;
				font-family: 'Arial';
				text-align: center;
				cursor: pointer;
				border-radius: 15px;
				opacity: 0.5;
			}
			
			.right {
				left: 1010px;
				top: 124px;
			}
		</style>
		<script src="../day11-Vue/js/axios.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<!--<script type="text/javascript">
			var time = null;  
			// 计数器
			var num = 0;
			//无缝滚动的原理：复制对应的图片，走到最后一张的时候，瞬间回到第0张位置
			$(function() {
				
				$('.list_con').hover(function() {
					// 鼠标进入的时候，就需要让图片停止
					clearInterval(time)
				}, function() {
					// 鼠标离开的时候，就需要滚动
					time = setInterval(function() {
						// 每隔100毫秒调用一下计时器
						num -= 10;
						// 写咱们的业务逻辑
						// 判断当前的图片是否到末尾
						if(num < -1000) {
							// 需要重置num 
							num = 0;
						}
						$('#list').css({
							'left': num + 'px'
						})
					}, 100)
				})

				time = setInterval(function() {
					// 每隔100毫秒调用一下计时器
					num -= 10;
					// 写咱们的业务逻辑
					// 判断当前的图片是否到末尾
					if(num < -1000) {
						// 需要重置num 
						num = 0;
					}
					$('#list').css({
						'left': num + 'px'
					})
				}, 100)

			})
		</script>-->
	</head>

	<body>
		<div class="list_con" id="slide">
			<ul id="list" >
				<li v-for="item in content">					
					<a href="#" ><img src="img/goods002.jpg" alt="商品图片"></a>
					
				</li>				
			</ul>
		</div>
	</body>
	<script type="text/javascript">
		var vm = new Vue({
			el:'#slide',
			data:{
				content:['img/goods001.jpg','img/goods002.jpg','img/goods003.jpg',
				'img/goods005.jpg','img/goods001.jpg']
			}
		})
	</script>

</html>